<?php

namespace App\Entity\Sale;

use ApiPlatform\Core\Annotation\ApiResource;
use App\Base\Annotation\Common;
use App\Repository\Sale\SaleMiaoCircleTypeRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

/**
 * @ApiResource()
 * @ORM\Entity(repositoryClass=SaleMiaoCircleTypeRepository::class)
 */
class SaleMiaoCircleType
{
    /**
     * @Common(cnName="#",listType="text",editType="text")
     * @Groups({"sale"})
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @Common(cnName="名称",listType="text",editType="text",width="200")
     * @Groups({"sale"})
     * @ORM\Column(type="string", length=255)
     */
    private $name;

    /**
     * @Common(cnName="间隔（天，x）",listType="text",editType="text",width="200")
     * @Groups({"sale"})
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $intervalDays;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(string $name): self
    {
        $this->name = $name;

        return $this;
    }

    public function getIntervalDays(): ?string
    {
        return $this->intervalDays;
    }

    public function setIntervalDays(?string $intervalDays): self
    {
        $this->intervalDays = $intervalDays;

        return $this;
    }
}
